package homework;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Scanner;

public class test01 {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        String name =scan.nextLine();
        String pwd =scan.nextLine();
        String nick =scan.nextLine();
        int age = scan.nextInt();
        User u = new User(name,pwd,nick,age);
        FileOutputStream fos = new FileOutputStream("./"+name+".obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);

        oos.writeObject(u);
        oos.close();
        System.out.println("输出完毕");
    }
}
